import type { DataTableColumns } from 'naive-ui'

const codeStore = useCodeStore()

export const basicColumns: DataTableColumns<BaseAppPO> = [
  IdColumn,
  {
    key: 'code',
    title: '编码'
  },
  {
    key: 'name',
    title: '名称'
  },
  {
    key: 'url',
    title: '地址'
  },
  {
    key: 'ordIdx',
    title: '排序'
  },
  {
    key: 'status',
    title: '状态',
    render(row) {
      const type = row.status == _Status.Enabled ? _NTagType.Success : _NTagType.Error
      return renderTag(codeStore.getName(_Dict.Status, row.status), type)
    }
  },
  ...BaseColumns
]
